<template>
  <div class="mui-content">
    <div class="search" v-if="false">
    <input type="text" placeholder="请输入活动关键词">
    <div class="mui-icon mui-icon-search"></div>
  </div>
    <div class="search-wrapper" v-for="(item,index) in Applydata" :key="index" >
      <div class="titleContent" :class="(index==0)?'searchwrapper1':''">
        <div class="title" @click="goApply(Applydata[index])">{{item.ProjectResourceName}}</div>
        <!--<div class="state"></div>-->
        <!--<img class="img" src="../../assets/img/person_img16.png" alt="">-->
        <!--<router-link class="apply" to="MyApply"></router-link>-->
      </div>
      <div class="listContent">
        <div class="listTitle">学段范围：{{item.LearnStage}}</div>
        <div class="middle ">学科类型：{{item.Subject}}</div>

      </div>
      <div class="listContent">
        <div class="listTitle">资源类型：{{item.ProjectCategory}}</div>
        <div class="middle ">状态：<span>{{item.State=='申报'?'未提交':'已提交'}}</span></div>

      </div>
      <div class="listContent">
        <div class="listTitle">申报时间：{{item.FillDate.split('0:0')[0]}}</div>
        <!--<div class="middle ">结束时间：{{item.FillDate}}</div>-->

      </div>
    </div>
  </div>

</template>

<script>
    export default {
        name: "Apply.vue",
      data(){
          return{
            UserId:'',
            myInfo:{},
            Applydata:{}
          }
      },
      created(){
          let me=this;
          me.$Global.zcServer.Post({
            IsNeedLogin: 'true',
            Paras:{
              UserId:me.$Global.UserId ,
              Name:'Vue_CourseResource',
              action:"MyApply",
              Data:{
              }
            },
            Callback:me.cb_ApplyByRegPhone,
            Scope:me,
          });
      },
      methods:{
        goApply(index){
          let data={};
          data.Name=index.ProjectResourceName;
          data.SN=index.ProjectResourceSN;
          data.TS='';
          data.Id=index.Id;
          data.ProjectType='';
          data.isCanWrite='';
          sessionStorage.setItem("ApplySN", JSON.stringify(data));
          this.$router.push('/PaperApply')
        },
        cb_ApplyByRegPhone(resJson,scope){
          console.log(resJson);
          this.Applydata=resJson.data



        },
        // Callback_Login(resJson,req){
        //   this.myInfo=resJson.data
        //   // console.log( this.myInfo)
        // },
        /*时间转换*/
        formatDate(dt) {
          let year = dt.getFullYear();
          let month = dt.getMonth() + 1;
          let date = dt.getDate();
          return year + "-" + month + "-" + date
        },
        Test(time) {
          let t= time.slice(6, 19);
          let NewDtime = new Date(parseInt(t));
          return this.formatDate(NewDtime);
        },
      }
    }
</script>

<style scoped>
  .mui-content .search{
    width: 100%;
    /*margin-top: 10px;*/
    margin-bottom: 0px;
    position: relative;
  }
  .mui-content .search input{
    /*float: left;*/
    /*display: inline-block;*/
    width: 100%;
    border: none;
    outline: none;
    margin-bottom: 0px;
  }
  .mui-content .search input::-webkit-input-placeholder {
    font-size: 13px;
    text-align: left;
  }
  .mui-content .search .mui-icon{
    position: absolute;
    width: 1.56rem;
    height: 1.56rem;
    right: 10px;
    top: 8px;
    color: rgba(93, 194, 240, 1);
    /*margin-right: 20px;*/
  }

  .mui-content .search-wrapper{
    width: 100%;
    height: auto;
  }
  .searchwrapper1{
    margin-top: 0 !important;
  }
  .mui-content .search-wrapper .titleContent{
    width: 100%;
    height: 3.12rem;
    padding-left: 2%;
    background-color: white;
    /*border-bottom: 1px solid darkgray;*/
    margin-top: 10px;

  }

  .mui-content .search-wrapper .titleContent .title,.state{
    color:rgba(93, 194, 240, 1);
    float:left;
    display: inline-block;
    height: 3rem;
    line-height: 3.2rem;
    -webkit-line-clamp:1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
   .mui-content .listContent{
     display: flex;
     width: 100%;
     height: 1.5rem;
     line-height:1rem;
     padding-left: 2%;
     background-color: white;
   }
  .mui-content .listContent *{
    width: 54%;
    font-size: 13px;
    color: #8f8f94;
    /*height: 0.8rem;*/
    /*line-height: 0.8rem;*/
  }


</style>
